-
Notifications
You must be signed in to change notification settings - Fork 95
Ensure that xtrigger OR fails validation #6772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 8.6.x
Are you sure you want to change the base?
Conversation
93f5936 to
a3561d3
Compare
4013771 to
6845de6
Compare
6845de6 to
c9f1d34
Compare
|
This fails here and on master, but I wonder if it needs to? It's been a long time since I looked at - and probably wrote - the associated code, so I'm not sure of the reason for the restriction anymore, and whether it should apply to this sort of expression (and I'm out of time today). But possibly it should not fail because it's equivalent to this: |
If this PR isn't changing behaviour, suggest moving this to another issue. Opened #6949. |
|
As Hillary pointed out, there is already logic intended to catch xtriggers used in conditional expressions: cylc-flow/cylc/flow/scripts/validate.py Lines 196 to 210 in 700eb02
However, this check isn't catching situations where there are no tasks on the LHS, only xtriggers. Sidenote: Strangely, this code is in If the new test covers all of the logic of the old one, suggest ripping the old check out. There are probably tests for the old check which could do with being combined / erased. |
|
I ran a bunch of our workflows through However, beyond |
Unfortunately, due to enforced home dir privacy here, I can't see our workflows. |
|
@wxtim, I think the reason you drafted this is that there is already code that is supposed to detect this scenario, but it's not working right, see #6772 (comment). We only need one check, but would like it to cover all bases. Removing (or fixing) the other check would probably resolve the situation where this expression is failing validation: Not strictly the job of this PR, but these two approaches have to be rationalised anyway (see #6772 (comment)) |
| # * the expression is constructed internally | ||
| # * https://github.com/cylc/cylc-flow/issues/4403 | ||
| except (SyntaxError, ValueError) as exc: | ||
| err_msg = str(exc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From 3.10 Python no longer emits the message being searched for here. ref
Done that
I couldn't find any and nothing failed when I took it out. I have added a unit test for some of the remaining untested stuff. I'm not entirely convinced that it's reachable. |
Remove check for "unexpected EOF" which is now no longer emitted https://github.com/python/cpython/blob/6826166280d6518441a729b444173db205c4ab20/Doc/whatsnew/3.10.rst#syntaxerrors f
9b2acf7 to
68a4d07
Compare
Closes #6771
Check List
CONTRIBUTING.mdand added my name as a Code Contributor.setup.cfg(andconda-environment.ymlif present).?.?.xbranch.